package com.pomr.service.synthesize;

import java.util.List;

import com.pomr.model.synthesize.Manufacturer;
import com.pomr.model.sys.Agency;
import com.pomr.model.sys.User;
import com.pomr.util.page.Page;

public interface ManufacturerService {
	/**
	 * 新增厂商信息 名称不为空
	 * @param manufacturer
	 * @return
	 * @throws Exception
	 */
	public boolean saveManufacturer(Manufacturer manufacturer) throws Exception;
	
	/**
	 * 查询厂商信息  （名称、邮箱、联系方式、状态）
	 * @param name
	 * @param status
	 * @param email
	 * @param tel
	 * @param page
	 * @param limit
	 * @return
	 * @throws Exception
	 */
	public Page<List<Manufacturer>> searchManufacturersByCondition(String name, String email, String tel,  String kjm,
			String page, String limit,String bh) throws Exception;
	
	/**
	 * 删除厂商信息 通过id
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public boolean deleteManufacturersByIds(String[] ids) throws Exception;
	
	/**
	 * 通过id获取厂商详细信息
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Manufacturer searchManufacturerById(String id) throws Exception;
	
	/**
	 * 通过id更新厂商信息（状态、地址、邮箱、联系方式、备注）
	 * @param manufacturer
	 * @return
	 * @throws Exception
	 */
	public boolean editManufacturerById(Manufacturer manufacturer) throws Exception;
	
	/**
	 * 通过id更新厂商信息状态
	 * @param manufacturer
	 * @return
	 * @throws Exception
	 */
	public boolean editManufacturerStatusById(Manufacturer manufacturer) throws Exception;
	
	/**
	 * 获取机构拥有的厂商
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public List<Manufacturer> searchManufacturersOfAgency(User user) throws Exception;
	
	/**
	 * 获取机构拥有的厂商
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public List<Manufacturer> searchManufacturersByAgency(Agency agency) throws Exception;

}
